package com.xncoding.trans.enums;

import java.util.Arrays;
/**
 * 缓存类型
 *
 * @CreateAt: 2023-11-3 11:26:22
 * @ModifyAt: 2023-11-3 11:26:22
 * @Version 1.0
 */
public enum RedisCacheEnums {
    QUERY_MEMBER_INFO(1, "查询会员信息"),
    QUERY_MEMBER_INFO1(2, "查询会员信息"),
    ;
    private Integer code;
    private String type;
    RedisCacheEnums(Integer code, String type) {
        this.code = code;
        this.type = type;
    }public static RedisCacheEnums getByCode(int code) {
        return Arrays.stream(RedisCacheEnums.values())
                .filter(item -> item.getCode().intValue() == code)
                .findFirst()
                .orElse(null);
    }
    
    public Integer getCode() {
        return code;
    }
    public String getType() {
        return type;
    }

    public static void main(String[] args) {
//        Arrays.stream(RedisCacheEnums.values()).map()
    }
}